home *** CD-ROM | disk | FTP | other *** search
/ Zoom 2 / Zoom - Release 2 (1996)(Active Software)[!].iso / programming / amos / amossible / structures / subrout2.amos / subrout2.amosSourceCode
Encoding:
AMOS Source Code  |  1980-05-17  |  532 b   |  18 lines

  1. Rem As in the previous example,we go to a subroutine,but now we
  2. Rem show that this program only sends us to the subroutine if a certain
  3. Rem condition has been achieved. 
  4. Rem In this case,we keep adding 1 to the "X" variable-If "X" is greater  
  5. Rem than or equal to 100,the program is sent to the SUBBIT subroutine, 
  6. Rem where a message is displayed,AMOS is made to wait for a second,
  7. Rem and then returns to the editor.
  8. X=0
  9. MAIN:
  10. X=X+1
  11. If X>=100 Then Gosub SUBBIT
  12. Print At(0,0);X
  13. Wait 1
  14. Gosub MAIN
  15. SUBBIT:
  16. Print "X=100"
  17. Wait 50
  18. Edit